package com.htthorizon.powersupply.utils;

import org.apache.commons.lang3.StringUtils;

public class OrgUtil {


    public static String getStdOrgNm(String stdOrgNm) {
        return StringUtils.isNotEmpty(stdOrgNm) ? stdOrgNm
                .replace("供电所", "").replace("供电服务站", "") : stdOrgNm;
    }

    public static String map(String orgNmae) {
        if (StringUtils.isNotEmpty(orgNmae)) {
            if (orgNmae.contains("城东")) {
                return "城东";
            } else if (orgNmae.contains("天元")) {
                return "天元";
            } else if (orgNmae.contains("渌口")) {
                return "渌口";
            } else if (orgNmae.contains("醴陵")) {
                return "醴陵";
            } else if (orgNmae.contains("攸县")) {
                return "攸县";
            } else if (orgNmae.contains("茶陵")) {
                return "茶陵";
            } else if (orgNmae.contains("炎陵")) {
                return "炎陵";
            }else if (orgNmae.contains("株洲")) {
                return "株洲";
            }
        }
        return orgNmae;
    }
}
